package org.NooLab.itexx.app.controller;

import java.awt.*;
import java.awt.event.*;



public class ExitListener extends WindowAdapter {

	ExitActionCallback actionOnExit=null;
	
	public ExitListener(){
	}
	
	public ExitListener( ExitActionCallback exitaction){
		this.actionOnExit = exitaction;
	}
	
	
	public void windowClosing(WindowEvent event) {
		
		if (actionOnExit!=null){
			actionOnExit.doThis(event) ;
		}
		
		System.exit(0);
	}
}
